Currently notoken is being listed as possible
API error twice if it's explicitly set as
required parameter and needsToken() returns
true.
See:
https://www.wikidata.org/w/api.php?action=paraminfo&modules=edit
Change-Id: Ia17c5cfa634919b43affa146df0d1dc0ff06b758
}
if ( $this->needsToken() ) {
- $ret[] = array( 'missingparam', 'token' );
+ if ( !isset( $params['token'][ApiBase::PARAM_REQUIRED] )
+ || !$params['token'][ApiBase::PARAM_REQUIRED]
+ ) {
+ // Add token as possible missing parameter, if not already done
+ $ret[] = array( 'missingparam', 'token' );
+ }
$ret[] = array( 'sessionfailure' );
}